home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsISVGRendererGlyphGeometry.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  181 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISVGRendererGlyphGeometry.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISVGRendererGlyphGeometry_h__
  6. #define __gen_nsISVGRendererGlyphGeometry_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISVGRendererRegion; /* forward declaration */
  18.  
  19. class nsISVGRendererGlyphMetrics; /* forward declaration */
  20.  
  21. class nsISVGRendererCanvas; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsISVGRendererGlyphGeometry */
  25. #define NS_ISVGRENDERERGLYPHGEOMETRY_IID_STR "cd302675-b093-4018-8081-3e65af962aa8"
  26.  
  27. #define NS_ISVGRENDERERGLYPHGEOMETRY_IID \
  28.   {0xcd302675, 0xb093, 0x4018, \
  29.     { 0x80, 0x81, 0x3e, 0x65, 0xaf, 0x96, 0x2a, 0xa8 }}
  30.  
  31. /**
  32.  * \addtogroup renderer_interfaces Rendering Engine Interfaces
  33.  * @{
  34.  */
  35. /**
  36.  * One of a number of interfaces (all starting with nsISVGRenderer*)
  37.  * to be implemented by an SVG rendering engine. See nsISVGRenderer
  38.  * for more details.
  39.  *
  40.  * The SVG rendering backend uses this interface to communicate to the
  41.  * rendering engine-native glyph objects.
  42.  *
  43.  * A glyph object is instantiated by the rendering backend for a given
  44.  * nsISVGGlyphGeometrySource object with a call to
  45.  * nsISVGRenderer::createGlyphGeometry(). The glyph object is assumed
  46.  * to store a reference to its associated source object and provide
  47.  * glyph rendering and hit-testing for the (composite) glyph described
  48.  * by the nsISVGGlyphGeometrySource members.
  49.  */
  50. class NS_NO_VTABLE nsISVGRendererGlyphGeometry : public nsISupports {
  51.  public: 
  52.  
  53.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISVGRENDERERGLYPHGEOMETRY_IID)
  54.  
  55.   /**
  56.    * Paint this object.
  57.    *
  58.    * @param canvas The canvas to render to.
  59.    */
  60.   /* void render (in nsISVGRendererCanvas canvas); */
  61.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) = 0;
  62.  
  63.   /**
  64.    * Called by this object's corresponding nsISVGGlyphGeometrySource
  65.    * as a notification that some of the source's data (identified by
  66.    * paramter 'updatemask') has changed.
  67.    *
  68.    * @param updatemask An OR-ed combination of the UPDATEMASK_*
  69.    * constants defined in nsISVGGlyphGeometrySource.
  70.    * @return Region that needs to be redrawn.
  71.    */
  72.   /* nsISVGRendererRegion update (in unsigned long updatemask); */
  73.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) = 0;
  74.  
  75.   /**
  76.    * Get a region object describing the area covered with paint by
  77.    * this glyph geometry.
  78.    *
  79.    * @return Covered region.
  80.    */
  81.   /* nsISVGRendererRegion getCoveredRegion (); */
  82.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) = 0;
  83.  
  84.   /**
  85.    * Hit-testing method. Does this glyph geometry (with all relevant
  86.    * transformations applied) contain the point x,y?  Should work on a
  87.    * character-cell basis, rather than the actual character outline.
  88.    *
  89.    * @param x X-coordinate of test point.  @param y Y-coordinate of
  90.    * test point.
  91.    * @return PR_TRUE if the glyph geometry contains the point,
  92.    * PR_FALSE otherwise.
  93.    */
  94.   /* boolean containsPoint (in float x, in float y); */
  95.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) = 0;
  96.  
  97. };
  98.  
  99. /* Use this macro when declaring classes that implement this interface. */
  100. #define NS_DECL_NSISVGRENDERERGLYPHGEOMETRY \
  101.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas); \
  102.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval); \
  103.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval); \
  104.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval); 
  105.  
  106. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  107. #define NS_FORWARD_NSISVGRENDERERGLYPHGEOMETRY(_to) \
  108.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) { return _to Render(canvas); } \
  109.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) { return _to Update(updatemask, _retval); } \
  110.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) { return _to GetCoveredRegion(_retval); } \
  111.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) { return _to ContainsPoint(x, y, _retval); } 
  112.  
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  114. #define NS_FORWARD_SAFE_NSISVGRENDERERGLYPHGEOMETRY(_to) \
  115.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) { return !_to ? NS_ERROR_NULL_POINTER : _to->Render(canvas); } \
  116.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(updatemask, _retval); } \
  117.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCoveredRegion(_retval); } \
  118.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsPoint(x, y, _retval); } 
  119.  
  120. #if 0
  121. /* Use the code below as a template for the implementation class for this interface. */
  122.  
  123. /* Header file */
  124. class nsSVGRendererGlyphGeometry : public nsISVGRendererGlyphGeometry
  125. {
  126. public:
  127.   NS_DECL_ISUPPORTS
  128.   NS_DECL_NSISVGRENDERERGLYPHGEOMETRY
  129.  
  130.   nsSVGRendererGlyphGeometry();
  131.  
  132. private:
  133.   ~nsSVGRendererGlyphGeometry();
  134.  
  135. protected:
  136.   /* additional members */
  137. };
  138.  
  139. /* Implementation file */
  140. NS_IMPL_ISUPPORTS1(nsSVGRendererGlyphGeometry, nsISVGRendererGlyphGeometry)
  141.  
  142. nsSVGRendererGlyphGeometry::nsSVGRendererGlyphGeometry()
  143. {
  144.   /* member initializers and constructor code */
  145. }
  146.  
  147. nsSVGRendererGlyphGeometry::~nsSVGRendererGlyphGeometry()
  148. {
  149.   /* destructor code */
  150. }
  151.  
  152. /* void render (in nsISVGRendererCanvas canvas); */
  153. NS_IMETHODIMP nsSVGRendererGlyphGeometry::Render(nsISVGRendererCanvas *canvas)
  154. {
  155.     return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157.  
  158. /* nsISVGRendererRegion update (in unsigned long updatemask); */
  159. NS_IMETHODIMP nsSVGRendererGlyphGeometry::Update(PRUint32 updatemask, nsISVGRendererRegion **_retval)
  160. {
  161.     return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163.  
  164. /* nsISVGRendererRegion getCoveredRegion (); */
  165. NS_IMETHODIMP nsSVGRendererGlyphGeometry::GetCoveredRegion(nsISVGRendererRegion **_retval)
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* boolean containsPoint (in float x, in float y); */
  171. NS_IMETHODIMP nsSVGRendererGlyphGeometry::ContainsPoint(float x, float y, PRBool *_retval)
  172. {
  173.     return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175.  
  176. /* End of implementation class template. */
  177. #endif
  178.  
  179.  
  180. #endif /* __gen_nsISVGRendererGlyphGeometry_h__ */
  181.